//
//  ORPublicTool.h
//  BaidiMall
//
//  Created by 欧阳荣 on 2017/7/6.
//  Copyright © 2017年 欧阳荣. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ORPublicTool : NSObject

//检查输入是否为空，返回对应下标
+ (BOOL)checkIsNilForTextFields:(NSArray <UITextField *>*)fields nilIndex:(void(^)(NSInteger idx))nilIndex;
//placeHolder
+ (BOOL)checkIsNilForTextFields:(NSArray <UITextField *>*)fields;

//手机号
+ (BOOL)isMobileNumber:(NSString *)mobileNum;

+ (void)callPhoneWithPhoneNumber:(NSString *)phoneNumber;

//需要WXApi
//+ (void)wxapiSharedScene:(int)scene title:(NSString *)titel image:(UIImage *)image description:(NSString *)description url:(NSString *)url;

#pragma mark -- other

+ (UIImage *)imageScale:(UIImage *)img size:(CGSize)size;

//判断身份证号
+ (BOOL)IsIdentityCard:(NSString *)IDCardNumber;
//判断是否是字母和数字
+ (BOOL)IskeyWords:(NSString *)Words;
//判断不全是数字
+ (BOOL)IscheckPassWord:(NSString *)word;


//计算文字占用宽度
+ (CGFloat)calculateWidthWithString:(NSString *)string height:(CGFloat)height font:(UIFont *)font;
//缓存
+ (NSString *)folderSizeForCache;
//移除缓存
+ (void)removeCache;

//提示
+ (void)showAlert:(NSString *)title message:(NSString *)msg okAction:(void(^)())block;

@end

